import axios from 'axios'
// 获取单词管理列表
const services = dse.base_api_url;

//查询管道--根据年份、区域、管材、管径
export function getPipeBaseInfo(params) {
    return new Promise((resolve, reject) => {
        let url = `${services}/pipeBaseInfoController/getPipeBaseInfo.do`;
        axios.post(url, params)
            .then(response => {
                resolve(response.data);
            }).catch((error) => {
                reject(error);
            })
    })
}

// 删除管道
export function saveOrUpdate(params){
    return new Promise((resolve, reject) => {
        let url = `${services}/pipeBaseInfoController/saveOrUpdate.do`;
        axios.post(url, params)
            .then(response => {
                resolve(response.data);
            }).catch((error) => {
                reject(error);
            })
    })
}